package com.zzzyh.forumsystemclient.services.impl;

import com.zzzyh.forumsystemclient.dao.Article_BoardMapper;
import com.zzzyh.forumsystemclient.model.Article_Board;
import com.zzzyh.forumsystemclient.services.IArticle_BoardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 郑雨杭
 * @create 2025/6/4 - 14:58
 */
@Service
public class Article_BoardServiceImpl implements IArticle_BoardService {
    @Autowired
    private Article_BoardMapper article_boardMapper;

    //@Override
    public void updateBoardArticle(Article_Board articleBoard) {
        //article_boardMapper.updateBoardArticle(articleBoard);
    }

    @Override
    public Article_Board getBoardArticle(Long articleId, Long BoardId) {
        return article_boardMapper.getBoardArticle(articleId,BoardId);
    }

    @Override
    public void createArticle_Board(Article_Board boardArticle) {
        article_boardMapper.insertSelective(boardArticle);
    }

    @Override
    public List<Article_Board> getBoardsByArticleId(Long articleId) {
        return article_boardMapper.getBoardsByArticleId(articleId);
    }

    @Override
    public void updateArticle_Board(Article_Board boardArticle) {
        article_boardMapper.updateByPrimaryKey(boardArticle);
        return;
    }

    @Override
    public List<Long> getArticleIdsByBoardId(Long boardId) {
        return article_boardMapper.getArticleIdsByBoardId(boardId);
    }
}
